package com.example.day_blog.model;

import com.example.day_blog.utils.DateUtils;
import lombok.Data;

import javax.print.DocFlavor;
import java.util.Date;
/**
 * @author starsea
 * @date 2024-01-17 10:02
 */
@Data
public class BlogInfo {
    private  Integer id;
    private String title;
    private String content;
    private Integer userId;
    private Integer deleteFlag;
    private Date createTime;
    private Date updateTime;
    private boolean isLoginUser;//is的get和set方法是不一样的
    private Integer upvote;

    public String getCreateTime() {
        return DateUtils.formatDate(createTime);
    }
}
